<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<title>Home</title>
	<!-- Meta tag Keywords -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta charset="UTF-8" />
	<meta name="keywords" content=""/>
	<!--// Meta tag Keywords -->
	<!-- css files -->
	<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" type="text/css" media="all">
	<!-- Bootstrap-Core-CSS -->
	<link rel="stylesheet" href="/static/css/font-awesome.css" type="text/css" media="all">
	<!-- Font-Awesome-Icons-CSS -->
	<link rel="stylesheet" href="/static/css/owl.carousel.css" type="text/css" media="all" />
	<!-- Owl-Carousel-CSS -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="all" />

	<!-- Style-CSS -->
	<!-- //css files -->
	<!-- web fonts -->
	<link href="http://fonts.googleapis.com/css?family=Molle:400i&amp;subset=latin-ext" rel="stylesheet">
	<link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&amp;subset=latin-ext" rel="stylesheet">
	<link href="http://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=latin-ext" rel="stylesheet">
</head>
<style>
	.btn-lg{
		background: #4aaaeb;
	}
</style>
<body>
<!--导航栏-->
<!-- sticky navigation -->
<div class="nav-links">
	<nav class='navbar navbar-default'>
		<div class='container'>
			<div class='collapse navbar-collapse'>
				<ul>
					<li>
<!--						<a href="/user/index">主页</a>-->
						<a href="/static/html/index.html">主页</a>
					</li>
					<li>
<!--						<a href="/user/about">流浪猫狗知识</a>-->
						<a href="/static/html/about.html">流浪猫狗知识</a>
					</li>
					<li>
						<a th:href="@{'/user/toPersonal?id='+${session.user.id}}">个人中心</a>
<!--						<a href="/user/personal">个人中心</a>-->

					</li>
					<li>
						<a th:href="@{/goodsy/getAGoodsyAll}">救助商品</a>
					</li>
					<li>
						<a th:href="@{/adopt/login}">领养中心</a>
					</li>
					<li th:if="${session.user.userName eq null}">
						<button class="btn-primary btn-lg loging" data-toggle="modal" data-target="#login">注册/登录</button>
					</li>
					<li th:unless="${session.user.userName eq null}">
						<button class="btn-primary btn-lg" data-toggle="modal" data-target="#editUsers">修改</button>
					</li>
					<li >
						<span th:text="${session.user.userName}"></span>
					</li>
					<button class="btn-primary btn-lg exit">退出</button>
				</ul>
			</div>
		</div>
	</nav>
</div>


<!-- //sticky navigation 首页轮播图 -->
<div class="w3l-main" id="home1">
	<div class="container">
		<!-- header -->
		<div class="header">
			<div class="logo">
				<h1>
					<a href="index.html">
						<img class="logo-img center-block" src="/static/images/logo.png" alt="" /> 流浪猫狗救助
					</a>
				</h1>
			</div>
			<div class="clearfix"> </div>
		</div>
		<!-- //header -->
	</div>
	<!-- Slider -->
	<div class="slider">
		<div class="callbacks_container">
			<ul class="rslides" id="slider">
				<li>
					<div class="slider-img-w3layouts one">
						<div class="w3l-overlay">
							<div class="container">
								<div class="banner-text-info">
									<h3>我们随时
										<span>欢迎</span> 你们来
										<span>咨询</span>！
									</h3>
									<p> 全面的猫狗护理指南，让您的流浪猫狗感受到您的爱</p>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="slider-img-w3layouts two">
						<div class="w3l-overlay">
							<div class="container">
								<div class="banner-text-info">
									<h3>你可以展示你的
										<span>爱</span> 向你
										<span>的流浪猫狗</span>!</h3>
									<p> 全面的猫狗护理指南，让您的流浪猫狗感受到您的爱</p>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="slider-img-w3layouts three">
						<div class="w3l-overlay">
							<div class="container">
								<div class="banner-text-info">
									<h3>猫狗 是你的
										<span>朋友</span>！&nbsp;&nbsp;猫狗是你的
										<span>家人</span> !</h3>
									<p> 全面的猫狗护理指南，让您的流浪猫狗感受到您的爱</p>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="slider-img-w3layouts four">
						<div class="w3l-overlay">
							<div class="container">
								<div class="banner-text-info">
									<h3>猫狗如此
										<span>可爱</span> 你们怎么可能
										<span>不爱</span>它们!</h3>
									<p>全面的猫狗护理指南，让您的流浪猫狗感受到您的爱</p>
								</div>
							</div>
						</div>
					</div>
				</li>
			</ul>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--//Slider-->
</div>
<!--//banner-->



<!-- footer -->
<section class="footer-w3">
	<div class="container">
		<div class="col-lg-4 col-md-4 col-sm-4 footer-agile1" data-aos="zoom-in">
			<h3>网站简介</h3>
			<p class="footer-p1">
				该网站是用于想领养流浪猫狗和想成为我们其中一员，那么你将再这里实现你的想法。
				如果你是领养者，请认真选取想要领养的流浪猫狗领养后，请认真负责对待可爱的猫狗！
				如果你是想成为志愿者，请联系我们，我们欢迎任何爱心认识，加入我们！
			</p>
		</div>
		<div class="col-lg-4 col-md-4 col-sm-4 footer-mid-w3" data-aos="zoom-in">
			<h3>流浪猫狗展示</h3>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f7.jpg" alt=" " class="img-responsive">

			</div>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f2.jpg" alt=" " class="img-responsive">

			</div>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f3.jpg" alt=" " class="img-responsive">

			</div>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f4.jpg" alt=" " class="img-responsive">

			</div>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f5.jpg" alt=" " class="img-responsive">

			</div>
			<div class="agileinfo_footer_grid1">

					<img src="/static/images/f6.jpg" alt=" " class="img-responsive">

			</div>
			<div class="clearfix"> </div>
		</div>
		<!--联系方式-->
		<div class="col-lg-4 col-md-4 col-sm-4 footer-agile1" data-aos="zoom-in">
			<h3>联系方式</h3>
			<p>电话&nbsp;&nbsp;<span style="font-size: 22px;color: red">12345678901</span></p>
			<br>
			<p>邮件&nbsp;&nbsp;<span style="font-size: 22px;color: red">CatDog@aliyun.com</span></p>
			<br>
			<p>官网&nbsp;&nbsp;<span style="font-size: 22px;color: red">www.pet.com</span></p>
			<br>

		</div>

	</div>

</section>
<!-- 注册登录模块框 -->
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">
					<div role="tabpanel">
						<!-- Nav tabs -->
						<ul class="nav nav-tabs" role="tablist">
							<li role="presentation" class="active">
								<a href="#home" aria-controls="login" role="tab" data-toggle="tab">登录</a>
							</li>
							<li role="presentation">
								<a href="#tab" aria-controls="register" role="tab" data-toggle="tab">注册</a>
							</li>
						</ul>
					</div>
				</h4>
			</div>
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="home">
					<div class="modal-body">
						<form class="form-horizontal" id="user_form" method="post"
							  action="/user/loginByUser">
							<div class="form-group">
								<label for="new_loginName" class="col-sm-2 control-label">账号</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="new_loginName" placeholder="账号"
										   name="userName">
								</div>
							</div>
							<div class="form-group">
								<label for="new_loginPwd" class="col-sm-2 control-label">密码</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="new_loginPwd" placeholder="密码"
										   name="password">
								</div>
							</div>
							<div class="form-group">
								<label for="login_code" class="col-sm-2 control-label">验证码</label>
								<div class="col-sm-4">
									<input type="text" class="form-control" id="login_code" placeholder="验证码"
										   name="code">
									<div class="code" style="float: right">
										<img src="${pageContext.request.contextPath}/code" onclick="changeCode()"
											 id="checkCodeImg"/>
										<a href="javascript:changeCode()">看不清换一张</a><br>
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<button type="button" class=" btn-default" data-dismiss="modal">关闭</button>
								<button type="submit" class="btn-primary" >登录</button>
							</div>
						</form>
					</div>
				</div>
				<div role="tabpanel" class="tab-pane" id="tab">
					<div class="modal-body">
						<form class="form-horizontal" id="register_user_form" action="/user/addUser2" method="post">
							<div class="form-group">
								<label for="register_loginName" class="col-sm-2 control-label">账号</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="register_loginName" placeholder="账号"
										   name="userName">
								</div>
							</div>
							<div class="form-group">
								<label for="register_loginPwd" class="col-sm-2 control-label">密码</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="register_loginPwd" placeholder="密码"
										   name="password">
								</div>
							</div>
							<div class="form-group">
								<label for="register_gender" class="col-sm-2 control-label">性别</label>
								<div class="col-sm-8">
<!--									<input type="text" class="form-control" id="register_gender" placeholder="性别"-->
<!--										   name="sex">-->
										<select class="form-control" id="register_gender" name="sex">
											<option value="1">男</option>
											<option value="0">女</option>
										</select>

								</div>
							</div>
							<div class="form-group">
								<label for="register_email" class="col-sm-2 control-label">Email</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="register_email" placeholder="Email"
										   name="email">
								</div>
							</div>
							<div class="form-group">
								<label for="register_telephone" class="col-sm-2 control-label">电话</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="register_telephone" placeholder="电话"
										   name="phone">
								</div>
							</div>
							<div class="form-group">
								<label for="register_QQ" class="col-sm-2 control-label">QQ</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="register_QQ" placeholder="QQ账号"
										   name="QQ">
								</div>
							</div>
							<input type="submit" value="注册" class="btn-primary" style="margin-left: 200px">
							<button type="button" class=" btn-default" data-dismiss="modal" style="margin-left: 50px">关闭</button>
						</form>
					</div>
<!--					<div class="modal-footer">-->
<!--						<button type="button" class=" btn-default" data-dismiss="modal">关闭</button>-->
<!--						<button type="button" class=" btn-primary">注册</button>-->
<!--					</div>-->
				</div>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
<!-- 注册登录模块框 -->


<!--个人信息修改的模态框-->

<!-- 修改班级模态框 -->
<div class="modal fade" id="editUsers" tabindex="-1" role="dialog" aria-labelledby="myModalLabe">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title" id="myModalLabe">修改用户信息</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" id="edit_admin_form" action="/user/updatePersonInfo">
					<input type="hidden" id="edit_id" name="id">
					<div class="form-group">
						<label for="edit_userName" class="col-sm-2 control-label">
							用户名称
						</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="edit_userName" placeholder="用户名称" name="userName" disabled>
						</div>
						<label for="edit_password" class="col-sm-2 control-label">
							用户密码
						</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="edit_password" placeholder="用户密码" name="password" disabled>
						</div>
					</div>
					<div class="form-group">
						<label for="edit_sex" class="col-sm-2 control-label">
							性别
						</label>
						<div class="col-sm-4">
							<select class="form-control" id="edit_sex" name="sex">
								<option value="1">男</option>
								<option value="0">女</option>
							</select>
						</div>
						<label for="edit_telephone" class="col-sm-2 control-label">
							电话号码
						</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="edit_telephone" placeholder="电话" name="phone">
						</div>
					</div>
					<div class="form-group">
						<label for="edit_Email" class="col-sm-2 control-label">
							Email
						</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="edit_Email" placeholder="Email"  name="email">
						</div>
						<label for="edit_address" class="col-sm-2 control-label">
							地址
						</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="edit_address" placeholder="地址" name="address">
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class=" btn-default" data-dismiss="modal">关闭</button>
				<button type="submit" class=" btn-primary" >保存修改</button>
			</div>
		</div>
	</div>
</div>

<!-- js 非得用2.0版本得jQuery-->
<script src="/static/js/jquery-2.2.3.min.js"></script>

<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
<!-- //js -->

<!-- Banner Slider -->
<script src="/static/js/responsiveslides.min.js"></script>
<script>
	$(function () {
		$("#slider").responsiveSlides({
			auto: true,
			pager: true,
			nav: true,
			speed: 1000,
			namespace: "callbacks",
			before: function () {
				$('.events').append("<li>before event fired.</li>");
			},
			after: function () {
				$('.events').append("<li>after event fired.</li>");
			}
		});


		$(".exit").on('click',function(){
			location.href = 'http://localhost:8081/';
		})
	});

	$.ajax({
		type: 'POST',
		url: '/user/updatePersonInfo',
		data: {

		}

	})

</script>
<!-- //Banner Slider -->

</body>
</html>